"burger menu"
Bootstrap 4.1.1 Snippet by ALIMUL AL RAZY

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.2/TweenMax.min.js"></script>
<h1>Burger Navigation</h1>
<div class="nav">
<div class="toggle-btn">
<span class="one"></span>
<span class="two"></span>
</div>
<div class="menu">
<div class="data">
<ul>
<li>Navigation</li>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Works</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
</div>
</div>
<div class="example">
</div>
<script>
var t1 = new TimelineMax({paused: true});
t1.to(".one", 0.8, {
y: 6,
rotation: 45,
ease: Expo.easeInOut
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
html, body {
margin: 0;
padding: 0;
width: 100%;
}
h1 {
position: absolute;
top: 46%;
left: 50%;
transform: translate(-50%, -50%);
color: #fff;
font-size: 48px;
font-weight: lighter;
}
.nav{
background: #042b42;
height: 100vh;
}
.example{
height: 100vh;
background-color: blue;
}
.toggle-btn {
position: fixed;
margin: 1.4em;
padding: 1em;
width: 40px;
height: 12px;
right: 0;
z-index: 1;
cursor: pointer;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: